-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(rn): get login working e2e #1132
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME).javaClass != BouncyCastleProvider::class.java) { | ||
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was due to the fact that android adds its own bouncy castle implementation that doesn't include EC
) | ||
.apply() | ||
|
||
return promise.resolve(true) | ||
} catch (e: Exception) { | ||
Log.e("error", "an error happened", e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, remove this
|
||
export default function App() { | ||
const [publicKey, setPublicKey] = useState<string | null>(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'publicKey' is assigned a value but never used.
} | ||
|
||
return HpkePrivateKey.create( | ||
com.google.crypto.tink.hybrid.HpkePublicKey.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use the proto version of the public key elsewhere hence the need for this specific one. I'm going to look into refactoring things so we can use the same interfaces throughout
return DatatypeConverter.printHexBinary(outputStream.toByteArray()).uppercase() | ||
} | ||
|
||
private fun convertToUncompressedPublicKeyBytes(ephemeralPublicKey: ECPublicKey): ByteArray { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna follow up and actually make this a helper that takes in: key: bytes, inputFormat: PointFormatType, outputFormat: PointFormatType
to make things a bit cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a super barebones signer implementation that needs to move out of the example and in to the RN src, have this here to test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy cow this is intense. Great work!
|
||
useEffect(() => { | ||
const init = async () => { | ||
console.log("init again"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to take this out this log statement and the one below before merging (unless they're intentional).
console.log("publicKey", publicKey); | ||
setPublicKey(publicKey); | ||
}) | ||
.catch(console.error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The async-await is unnecessary. You can either just put this promise-then-catch at the top level of the useEffect
callback or keep the async-await
and use a try-catch block.
bundle, | ||
authenticatingType: "email", | ||
connectedEventName: "connectedEmail", | ||
orgId: orgId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Very nit) No need to repeat orgId
here.
}); | ||
} | ||
|
||
createAccount(params: CreateAccountParams): Promise<SignupResponse> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend using the override
keyword for all the abstract method implementations. It helps with readability and prevents errors if the signature don't match.
account-kit/rn-signer/src/index.tsx
Outdated
|
||
export default NativeTEKStamper; | ||
export { NativeTEKStamper }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be
export { NativeTEKStamper } from "./NativeTEKStamper";
?
72fae94
to
b84f08e
Compare
4dcf02b
to
5c58383
Compare
b84f08e
to
4d4d49a
Compare
5c58383
to
9819166
Compare
4d4d49a
to
4de66d8
Compare
9819166
to
e283195
Compare
4de66d8
to
285bed6
Compare
e283195
to
928bec5
Compare
285bed6
to
f3c7adb
Compare
928bec5
to
ee03d62
Compare
Just going through this! This is glorious @moldy530 ! 🔥🔥🔥 |
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR focuses on enhancing the
NativeTEKStamper
integration within theReact Native
application, improving module exports, and updating dependencies.Detailed summary
NativeTEKStamper
from default to named export.isTurboModule
.build.gradle
.package.json
with new dependencies.SignerClient
class with new methods for authentication.NativeTEKStamperModule
with HPKE decryption support.yarn.lock
for better compatibility.